using System.ComponentModel.DataAnnotations;
using AnQinFrameWorkAPI.Common.Enum;

namespace AnQinFrameWorkAPI.Entity.Finance.DTO.FinanceDetail;

/// <summary>
///     账目消费明细新增模型
/// </summary>
public class FinanceDetailAddDTO
{
    /// <summary>
    ///     分类id
    /// </summary>
    [Required(ErrorMessage = "分类id不可为空")]
    public string FinanceCategoryId { get; set; }

    /// <summary>
    ///     账户id
    /// </summary>
    [Required(ErrorMessage = "账户id不可为空")]
    public string FinanceAccountId { get; set; }

    /// <summary>
    ///     消费名称
    /// </summary>
    [Required(ErrorMessage = "消费名称不可为空")]
    public string Name { get; set; }

    /// <summary>
    ///     金额
    /// </summary>
    [Required(ErrorMessage = "金额不可为空")]
    public decimal Amount { get; set; }

    /// <summary>
    ///     类型（枚举：支出或者收入）
    /// </summary>
    [Required(ErrorMessage = "类型不可为空")]
    public FinanceEnum.FinanceDetailTypeEnum Type { get; set; }

    /// <summary>
    ///     收支时间
    /// </summary>
    [Required(ErrorMessage = "收支时间不可为空")]
    public DateTime TransactionTime { get; set; }

    /// <summary>
    ///     备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    ///     附件
    /// </summary>
    public string? Attachment { get; set; }
}